Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch "CPU instruction set" to document encoding instead #511

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

ISSOtm
Copy link
Member

@ISSOtm ISSOtm commented Nov 25, 2023

Fixes #456.

As mentioned there, optables provides a very compact view of instructions, but may not help discerning patterns; whereas gbz80(7) describes the instructions themselves, but does not work well as a cheat sheet.

This PR attempts to document what neither of those two resources do: the instructions' encoding, in a manner closer to how the CPU decodes them. The patterns can be gleaned from optables, especially in the octal view, but not everyone may connect the dots.

Cycle counts, behaviour descriptions, etc. have been removed, since that information can be found in gbz80(7) and optables; and removing that data makes this page more compact, and thus I think easier to navigate and grasp.

Instructions have been grouped thematically, and those groups roughly ordered—though blocks 0 and 3 are quite resistant to any consensus ordering.

Anyone and everyone is welcome to share their feedback on the decisions made about the content and the presentation. Thank you!

@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 10, 2023

cc people involved in #456: @Kenjugs @iximeow @54UL. What do you think?

@iximeow
Copy link
Contributor

iximeow commented Dec 13, 2023

broadly this seems really nice! i have the one nit, otherwise 👍 . you have a TODO about links to optables, are you thinking a paragraph of preface about those other resources? or something more deeply connected to the revised docs?

@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 14, 2023

I wanted to write a paragraph explaining the choice of what that page documents and what it doesn't, as well as giving links to other complementary resources.

Glad you like it! ^^

@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 17, 2023

The paragraph linking to other resources was easy to write, but an attempt at a key proved tremendously more difficult; I can't help but think I've fumbled it. But at least it's something that can be discussed.

@ISSOtm ISSOtm marked this pull request as ready for review December 20, 2023 20:54
@avivace avivace self-requested a review December 23, 2023 16:18
@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 29, 2023

I'm planning to merge this next week without further activity.

@ISSOtm ISSOtm merged commit 9cc0401 into gbdev:master Jan 11, 2024
2 checks passed
@ISSOtm ISSOtm deleted the cpu-encoding branch January 11, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU Instruction Set Encodings
3 participants